home *** CD-ROM | disk | FTP | other *** search
/ Mac Format 1995 June / MacFormat 25.iso / Shareware City / Developers / OutOfPhase1.1 Source / OutOfPhase Folder / IncrementalParameterUpdator.h < prev    next >
Text File  |  1994-12-30  |  6KB  |  159 lines

  1. /* IncrementalParameterUpdator.h */
  2.  
  3. #ifndef Included_IncrementalParameterUpdator_h
  4. #define Included_IncrementalParameterUpdator_h
  5.  
  6. /* IncrementalParameterUpdator module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* BinaryCodedDecimal */
  12. /* PlayTrackInfoThang */
  13. /* Memory */
  14. /* TrackObject */
  15. /* LinearTransition */
  16. /* NoteObject */
  17.  
  18. #include "BinaryCodedDecimal.h"
  19.  
  20. struct IncrParamUpdateRec;
  21. typedef struct IncrParamUpdateRec IncrParamUpdateRec;
  22.  
  23. /* forwards */
  24. struct TrackObjectRec;
  25. struct LinearTransRec;
  26. struct NoteObjectRec;
  27. struct TempoControlRec;
  28.  
  29. #ifdef ShowMeIncrParamUpdateRec
  30. struct IncrParamUpdateRec
  31.     {
  32.         LargeBCDType                        DefaultStereoPosition;
  33.         LargeBCDType                        CurrentStereoPosition;
  34.         struct LinearTransRec*    StereoPositionChange;
  35.         long                                        StereoPositionChangeCountdown;
  36.  
  37.         LargeBCDType                        DefaultSurroundPosition;
  38.         LargeBCDType                        CurrentSurroundPosition;
  39.         struct LinearTransRec*    SurroundPositionChange;
  40.         long                                        SurroundPositionChangeCountdown;
  41.  
  42.         LargeBCDType                        DefaultVolume;
  43.         LargeBCDType                        CurrentVolume;
  44.         struct LinearTransRec*    VolumeChange;
  45.         long                                        VolumeChangeCountdown;
  46.  
  47.         LargeBCDType                        DefaultReleasePoint1;
  48.         LargeBCDType                        CurrentReleasePoint1;
  49.         struct LinearTransRec*    ReleasePoint1Change;
  50.         long                                        ReleasePoint1ChangeCountdown;
  51.         MyBoolean                                ReleasePoint1FromStart; /* True = start, False = end */
  52.  
  53.         LargeBCDType                        DefaultReleasePoint2;
  54.         LargeBCDType                        CurrentReleasePoint2;
  55.         struct LinearTransRec*    ReleasePoint2Change;
  56.         long                                        ReleasePoint2ChangeCountdown;
  57.         MyBoolean                                ReleasePoint2FromStart; /* True = start, False = end */
  58.  
  59.         LargeBCDType                        DefaultAccent1;
  60.         LargeBCDType                        CurrentAccent1;
  61.         struct LinearTransRec*    Accent1Change;
  62.         long                                        Accent1ChangeCountdown;
  63.  
  64.         LargeBCDType                        DefaultAccent2;
  65.         LargeBCDType                        CurrentAccent2;
  66.         struct LinearTransRec*    Accent2Change;
  67.         long                                        Accent2ChangeCountdown;
  68.  
  69.         LargeBCDType                        DefaultAccent3;
  70.         LargeBCDType                        CurrentAccent3;
  71.         struct LinearTransRec*    Accent3Change;
  72.         long                                        Accent3ChangeCountdown;
  73.  
  74.         LargeBCDType                        DefaultAccent4;
  75.         LargeBCDType                        CurrentAccent4;
  76.         struct LinearTransRec*    Accent4Change;
  77.         long                                        Accent4ChangeCountdown;
  78.  
  79.         LargeBCDType                        DefaultPitchDisplacementDepthLimit;
  80.         LargeBCDType                        CurrentPitchDisplacementDepthLimit;
  81.         struct LinearTransRec*    PitchDisplacementDepthLimitChange;
  82.         long                                        PitchDisplacementDepthLimitChangeCountdown;
  83.  
  84.         LargeBCDType                        DefaultPitchDisplacementRateLimit;
  85.         LargeBCDType                        CurrentPitchDisplacementRateLimit;
  86.         struct LinearTransRec*    PitchDisplacementRateLimitChange;
  87.         long                                        PitchDisplacementRateLimitChangeCountdown;
  88.  
  89.         LargeBCDType                        DefaultPitchDisplacementStartPoint;
  90.         LargeBCDType                        CurrentPitchDisplacementStartPoint;
  91.         struct LinearTransRec*    PitchDisplacementStartPointChange;
  92.         long                                        PitchDisplacementStartPointChangeCountdown;
  93.         MyBoolean                                PitchDisplacementStartPointFromStart; /* True = start, False = end */
  94.  
  95.         LargeBCDType                        DefaultHurryUp;
  96.         LargeBCDType                        CurrentHurryUp;
  97.         struct LinearTransRec*    HurryUpChange;
  98.         long                                        HurryUpChangeCountdown;
  99.  
  100.         LargeBCDType                        DefaultDetune;
  101.         LargeBCDType                        CurrentDetune;
  102.         struct LinearTransRec*    DetuneChange;
  103.         long                                        DetuneChangeCountdown;
  104.         MyBoolean                                DetuneHertz; /* True = hertz, False = Halfsteps */
  105.  
  106.         LargeBCDType                        DefaultEarlyLateAdjust;
  107.         LargeBCDType                        CurrentEarlyLateAdjust;
  108.         struct LinearTransRec*    EarlyLateAdjustChange;
  109.         long                                        EarlyLateAdjustChangeCountdown;
  110.  
  111.         LargeBCDType                        DefaultDurationAdjust;
  112.         LargeBCDType                        CurrentDurationAdjust;
  113.         struct LinearTransRec*    DurationAdjustChange;
  114.         long                                        DurationAdjustChangeCountdown;
  115.         MyBoolean                                DurationAdjustAdditive; /* True = additive, False = multiplicative */
  116.  
  117.         struct TempoControlRec*    TempoControl;
  118.  
  119.         long                                        TransposeHalfsteps;
  120.     };
  121. #endif
  122.  
  123. /* build a new incremental parameter updator */
  124. IncrParamUpdateRec*        NewInitializedParamUpdator(struct TrackObjectRec* Template,
  125.                                                 struct TempoControlRec* TempoControl);
  126.  
  127. /* dispose of the incremental parameter updator */
  128. void                                    DisposeParamUpdator(IncrParamUpdateRec* Updator);
  129.  
  130. /* update a transition changer */
  131. void                                    UpdateOne(LargeBCDType* Current, struct LinearTransRec* Change,
  132.                                                 long* ChangeCountdown, long NumTicks);
  133.  
  134. /* execute a series of update cycles.  the value passed in is the number of */
  135. /* duration ticks.  there are DURATIONUPDATECLOCKRESOLUTION (64*2*3*5*7) ticks */
  136. /* in a whole note */
  137. void                                    ExecuteParamUpdate(IncrParamUpdateRec* Updator, long NumTicks);
  138.  
  139. /* evaluate a command frame & set any parameters accordingly */
  140. void                                    ExecuteParamCommandFrame(IncrParamUpdateRec* Updator,
  141.                                                 struct NoteObjectRec* Note);
  142.  
  143. /* sweep the value to a new value */
  144. void                                    SweepToNewValue(LargeBCDType Current,
  145.                                                 struct LinearTransRec* Change, long* ChangeCountdown,
  146.                                                 LargeBCDType TargetValue, SmallExtBCDType NumBeatsToReach);
  147.  
  148. /* sweep to a new value relative to the current value */
  149. void                                    SweepToAdjustedValue(LargeBCDType Current,
  150.                                                 struct LinearTransRec* Change, long* ChangeCountdown,
  151.                                                 LargeBCDType TargetValue, SmallExtBCDType NumBeatsToReach);
  152.  
  153. /* sweep to a new value relative to the current value */
  154. void                                    SweepToAdjustedValueMultiplicatively(LargeBCDType Current,
  155.                                                 struct LinearTransRec* Change, long* ChangeCountdown,
  156.                                                 LargeBCDType TargetValue, SmallExtBCDType NumBeatsToReach);
  157.  
  158. #endif
  159.